package com.life.notes.config.constant;

/**
 * 公共常量
 * @author lishuqian
 * @date 2020/6/15
 */
public class Constant {

    /**
     * 用户登录成功状态下，发起经过网关的所有后台接口默认会携带如下请求头，微服务内部互调也会传递！
     *  X-USER:用户工号
     *  X-USER-NAME:用户姓名
     *  X-USER-PHONE:手机号
     *  X-USER-EMAIL:邮箱
     *  X-USER-ROLE:角色编码
     *  X-USER-ROLE-NAME:角色名称
     *  X-USER-WHOLE-NET:是否全网（0-非全网，1-全网）
     * 例：String userName = BaseContextHandler.getHeader(Constant.HEADER_CURRENT_USER_NAME);
     */
    public static final String HEADER_CURRENT_USER = "X-USER";
    public static final String HEADER_CURRENT_USER_NAME = "X-USER-NAME";
    public static final String HEADER_CURRENT_USER_PHONE = "X-USER-PHONE";
    public static final String HEADER_CURRENT_USER_EMAIL = "X-USER-EMAIL";
    public static final String HEADER_CURRENT_USER_ROLE = "X-USER-ROLE";
    public static final String HEADER_CURRENT_USER_ROLE_NAME = "X-USER-ROLE-NAME";
    public static final String HEADER_CURRENT_USER_WHOLE_NET = "X-USER-WHOLE-NET";

    /**
     * 登录者角色
     */
    public static final String ROLE_LOGIN = "role_login";

    public static final String CACHEABLE_PARAM_KEY = "sys:service:";




}
